module.exports = function(grunt) {

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    clean: {
      build: ['public/javascripts/demo.min.js']
    },

    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n',
        // wrap: 'defind'
      },
      dist: {
        files: {
          'public/javascripts/demo.min.js':['public/javascripts/demo.js','public/javascripts/timer.js']  
        }
      }      
    },

    jshint: {
      files: [
        'Gruntfile.js', 
        'routes/*.js', 
        'service/*.js',
        'utils/*.js',
        'public/javascripts/**/*.js'
        ],
      options: {
        globals: {
          jQuery: true,
          console: true,
          module: true,
          document: true
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-clean');


  grunt.registerTask('dist', ['clean:build','uglify:dist']);
  grunt.registerTask('default', ['uglify:dist']);
  
};